An installation path too long prevents the building/loading of the application

Symptom:

  • An application cannot be built/loaded under Windows.

  • One of the following messages is displayed (either in the Error Log or Problems view or in the file compile_result.txt):

    path/file.h:number:number: fatal error: path/file.h: No such file or directory
      #include <path/file.h>
      ^~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
                      from path\file.c:number:
    path\file:number:number: fatal error: path/file.h: No such file or directory
      #include <path/file.h>
    fatal error: limits.h: No such file or directory
    fatal error: stdint.h: No such file or directory
    compiler-name: error: CreateProcess: No such file or directory
    It is not possible to create an application for platform "name". The installation path might be too long. Use the setting "substPluginsFolder" to substitute the path for the compiler. (path_of_the_compiler)
    The application for the PLC (resource "local", platform toolkit "BuiltInPlc") cannot be created/loaded. Check the views "Error Log" and "Problems" for more information.
    An error occurred during compiling or linking the code image (error code: 1).

     

  • One of the following messages is displayed for items within an PLC-object (x indicates the number of characters):

    The combination of absolute project path, configuration name and resource name exceeds the maximum length by x characters.
    The combination of absolute project path, configuration name, resource name and task name exceeds the maximum length by x  characters.
    The combination of absolute project path, configuration name, resource name and program instance name exceeds the maximum length by x  characters.
    The combination of absolute project path, configuration name, resource name and program type name exceeds the maximum length by x  characters.

Causes:

  • The installation path of Neuron Power Engineer is too long. That means that this path has more than 255 characters. Note that certain settings/options of the file archiver tool, if selected, may contribute to an increased length of the installation path.

  • The installation path and the path of the compiler that is used for building/loading the application result in a path with more than 255 characters.

Solution:

  • When extracting a package, deselect any options/settings in your file archiver tool that cause a long installation path.

  • Shorten the installation path of Neuron Power Engineer.

  • Shorten the name or path of the project.

  • Shorten the names for the mentioned elements within the PLC-object; hence for the →configuration→resource→program type, program →instance or →task. As some of these names are used twice in the combination, it might be sufficient to shorten the name by about half of the mentioned characters. Example: If the combination exceeds the maximum length by 9 characters, it is sufficient to shorten the name for the configuration by 5 characters.

    1. Shorten the path that is used by the compiler. Use the following configuration method of Neuron Power Engineer under Windows:

    2. Go to the folder where you installed Neuron Power Engineer.

    3. Locate the file NeuronPowerEngineer.ini and open it in a text editor.

    4. At the end of the file, enter -DsubstPluginsFolder and enter the letter of a free drive.

      Example
      ...
      -DsubstPluginsFolder=P
    5. Save the file.

    6. Start Neuron Power Engineer so that Neuron Power Engineer uses the correspondingly shortened path to build and load the application.

Observe:

  • When Neuron Power Engineer is exited properly, the drive is released again

  • During the operation of Neuron Power Engineer, do not manipulate the SUBST assignment of this drive under Windows. Otherwise irregularities might occur when building/loading applications.

  • Do not use Windows settings that permit longer paths than 255 characters. These settings are ignored by Neuron Power Engineer.

More useful information: Cannot build or load application